@echo off

rem Just init and exit
bgui init %0
exit /b

rem This is the entry point
:bgui_init
rem Create a new form
@ -program addform {".Text":"FirstApp","Name":"form1",".Location":"20,20",".Size":"200x100"}

rem Create a new label
@ -program newctl {".Text":"Hello, World!","Type":"Label",".Location":"50,25","Name":"lblOne"}

rem Attach the label to the form
@ -form1 addctl {"Name":"lblOne"}

rem Show the form and wait for exit
@ -form1 {"Method":"Run"}

rem EndOfFile signifies exit